cc.Class({
    extends: cc.Component,

    properties: {
        itemNode: cc.Node,
    },

    onLoad: function () {
        this.itemBox = this.itemNode.parent;
        this.itemNode.parent = null;
    },

    addItem(data) {
        var node = cc.instantiate(this.itemNode);
        var item = node.getComponent('ShopItemBags');
        node.parent = this.itemBox;
        item.init(data);
    },

});
